jQuery.fn.extend({
   findPos : function() {
       obj = jQuery(this).get(0);
       var curleft = obj.offsetLeft || 0;
       var curtop = obj.offsetTop || 0;
       var curheight = obj.offsetHeight;
       var curwidth = obj.offsetWidth;
       while (obj = obj.offsetParent) {
                curleft += obj.offsetLeft
                curtop += obj.offsetTop
       }

       return {x:curleft,y:curtop,z:curheight,t:curwidth};
   }
});